import { Module, ValidationPipe } from '@nestjs/common';
import { APP_PIPE } from '@nestjs/core';
import { TypeOrmModule } from '@nestjs/typeorm';
import { CommentModule } from 'lib/comment';
import { OperatingAssets } from 'libs/db/entity/operating-assets.entity';
import { OperatingAssetsController } from './operating-assets.controller';
import { OperatingAssetsService } from './operating-assets.service';

@Module({
    imports: [
        CommentModule,
        TypeOrmModule.forFeature([OperatingAssets])
    ],
    controllers: [
        OperatingAssetsController
    ],
    providers: [
        OperatingAssetsService,
        {
            provide: APP_PIPE,
            useClass: ValidationPipe
        }
    ],
})
export class OperatingAssetsModule { }
